﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinqToExcel;

namespace LiquidTrading.LiquidViewSyncTool
{
    public class LseETFs
    {
        const string FILE_LSE = "http://www.londonstockexchange.com/traders-and-brokers/security-types/etfs/list-etf-securities.xls";

        public static void ProcessFile()
        {

            var excel = new ExcelQueryFactory(FILE_LSE);
            excel.AddMapping<Format>(x => x.Issuer, "Issuer Name");

            var format = from x in excel.WorksheetRange<Format>("B6", "M500", "ETFS & ETPS")
                         select x;
        }


        public class Format
        {
            public string Issuer { get; set; }
            public string ISIN { get; set; }
            public string Currency { get; set; }
            public string Symbol { get; set; }
            public string Name { get; set; }
        }

    }

}
